/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ImportPanel.java
 *
 * Created on Mar 21, 2011, 9:42:40 PM
 */

package autotrade.application.gui.panel;

import autotrade.application.gui.MainFrame;

/**
 *
 * @author Dinh
 */
public class ImportDataPanel extends javax.swing.JPanel {

    private MainFrame mainFrame;

    /** Creates new form ImportPanel */
    public ImportDataPanel(MainFrame mainFrame) {
        this.mainFrame = mainFrame;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        importJButton = new javax.swing.JButton();
        OkJButton = new javax.swing.JButton();
        pickFileJButton = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        filePathJTextPane = new javax.swing.JTextPane();

        importJButton.setText("Import");

        OkJButton.setText("OK");
        OkJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                OkJButtonActionPerformed(evt);
            }
        });

        pickFileJButton.setText("Pick a file");

        jScrollPane1.setViewportView(filePathJTextPane);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(154, 154, 154)
                        .addComponent(importJButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(OkJButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(pickFileJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {OkJButton, importJButton});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pickFileJButton)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(OkJButton)
                    .addComponent(importJButton))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void OkJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OkJButtonActionPerformed
        mainFrame.importFileDialog.dispose();
    }//GEN-LAST:event_OkJButtonActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton OkJButton;
    private javax.swing.JTextPane filePathJTextPane;
    private javax.swing.JButton importJButton;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton pickFileJButton;
    // End of variables declaration//GEN-END:variables

}
